//import com.sun.tools.javac.util.List;
//
//import java.util.HashMap;
//
///**
// * Created by zhangjinrui on 17/6/27.
// */
//
//public class Solution139 {
//
//    public static void main(String args[]) {
//        Solution139 s = new Solution139();
//        System.out.println(s.wordBreak("", new String[]{"leet","Code"}));
//    }
//
////    HashMap<String, Integer> mp = new HashMap<>();
////    HashMap<String, Boolean> mp2 = new HashMap<>();
////    public boolean wordBreak(String s, List<String> wordDict) {
////        for (String s1 : wordDict) {
////            mp.put(s1, 1);
////        }
////        return dfs(s);
////    }
////
////    public boolean dfs(String s) {
////        if (s.length() == 0) {
////            return true;
////        }
////        if(mp2.containsKey(s)){
////            return mp2.get(s);
////        }
////        StringBuilder sb = new StringBuilder();
////        for (int i = 0; i < s.length(); i++) {
////            sb.append(s.charAt(i));
////            if (mp.containsKey(sb.toString())) {
//////                mp.remove(sb.toString());
////                if (dfs(s.substring(i + 1))) {
////                    mp2.put(s, true);
////                    return true;
////                }
//////                mp.put(sb.toString(), 1);
////            }
////        }
////        mp2.put(s, false);
////        return false;
////    }
//}
